package utils.utils;

import utils.utils.baseEnum.ActionTypeEnum;
import utils.utils.baseEnum.BizCategoryType;

/**
 * Created by Administrator on 2017/8/1.
 */
public class EnumUtils {
    public static void main(String[] args){

        ActionTypeEnum[] actionTypeEnums = ActionTypeEnum.values();
        for(ActionTypeEnum actionTypeEnum : actionTypeEnums){
            System.out.println("name=" + actionTypeEnum.getName());
            System.out.println("index= " + actionTypeEnum.getIndex());
            System.out.println("oridary=" + actionTypeEnum.ordinal());
            System.out.println("this = " + actionTypeEnum);
            System.out.println("下载值："  + actionTypeEnum.valueOf("下载"));
            System.out.println("name()方法= " + actionTypeEnum.name());
            System.out.println("--------------叫我分割线------------------");
        }

        BizCategoryType[] bizCategoryTypes = BizCategoryType.values();
        for(BizCategoryType bizCategoryType:bizCategoryTypes){
            System.out.println("categoryId is "+bizCategoryType.getCategoryId());
            System.out.println("categoryName is "+bizCategoryType.getCnName());
            System.out.println("-------------------------------------");
        }
    }
}